package com.ruicar.afs.cloud.channel.affiliation.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author panhj
 * @date 2020/05/19
 */
@Data
@TableName("channel_affiliated_units_temp")
@ApiModel(value = "挂靠单位信息表")
public class ChannelAffiliatedUnitsTemp extends BaseEntity<ChannelAffiliatedUnitsTemp> implements Serializable {

    /**
     * busi_type -- 业务类型 1-第三方公司挂靠;2-网约车
     */
    @Length(max = 2, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.busiType.Length")
    private String busiType;

    /**
     * affiliated_name -- 公司名称 第三方公司挂靠：挂靠公司名称；
     * 网约车：运营公司名称
     */
    @Length(max = 32, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.affiliatedName.Length")
    private String affiliatedName;

    /**
     * soc_uni_crt_code -- 统一社会信用代码
     */
    @Length(max = 32, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.socUniCrtCode.Length")
    private String socUniCrtCode;

    /**
     * whether_licence -- 是否有道路运输许可证 是；否
     */
    @Length(max = 2, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.whetherLicence.Length")
    private String whetherLicence;

    /**
     * trans_permit_validity -- 道路运输许可证有效期至
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date transPermitValidity;

    /**
     * founded_time -- 成立时间 业务类型为网约车：注册时间。
     * 业务类型为第三方公司挂靠：成立时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date foundedTime;

    /**
     * legal_person_name -- 法人代表人姓名
     */
    @Length(max = 32, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.legalPersonName.Length")
    private String legalPersonName;

    /**
     * legal_person_tel -- 法人联系方式 业务类型为第三方公司挂靠：法人联系方式
     * 业务类型为网约车：联系电话。
     */
    @Length(max = 20, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.legalPersonTel.Length")
    private String legalPersonTel;

    /**
     * legal_person_idcard -- 法人身份证号码
     */
    @Length(max = 32, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.legalPersonIdcard.Length")
    private String legalPersonIdcard;

    /**
     * opr_term_validity -- 营业期限至 业务类型为网约车时：网约车合作有效期
     * 业务类型为第三方公司挂靠时：营业期限至
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date oprTermValidity;

    /**
     * operation_years -- 已运营年限
     */
    private BigDecimal operationYears;

    /**
     * registered_capital -- 注册资本
     */
    private BigDecimal registeredCapital;

    /**
     * registered_province -- 注册省份
     */
    @Length(max = 10, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.registeredProvince.Length")
    private String registeredProvince;

    /**
     * registered_city -- 注册城市
     */
    @Length(max = 10, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.registeredCity.Length")
    private String registeredCity;

    /**
     * registered_address -- 详细注册地址 业务类型为网约车时，存注册地址。业务类型为第三方公司挂靠时，存详细注册地址
     */
    @Length(max = 150, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.registeredAddress.Length")
    private String registeredAddress;

    /**
     * term_validity -- 备案有效期至
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date termValidity;

    /**
     * operate_vehicles -- 自有运营车辆数 第三方公司挂靠：自有运营车辆数
     * 网约车：在运营网约车数量
     */
    private Integer operateVehicles;

    /**
     * operate_status -- 经营状态 存续在营开业在册
     */
    @Length(max = 2, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.operateStatus.Length")
    private String operateStatus;
    /**
     * operate_status -- 状态 存续在营开业在册
     */
    @Length(max = 2, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.status.Length")
    private String status;

    /**
     * oper_city -- 运营城市 业务类型为网约车的运营城市
     */
    @Length(max = 10, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.operCity.Length")
    private String operCity;

    /**
     * people_card_complete -- 人证完备数
     */
    private Integer peopleCardComplete;

    /**
     * cooper_plat -- 合作平台
     */
    @Length(max = 100, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.cooperPlat.Length")
    private String cooperPlat;

    /**
     * car_card_complete -- 车证完备数
     */
    private Integer carCardComplete;

    /**
     * peo_car_card_complete -- 人车证完备数
     */
    private Integer peoCarCardComplete;

    /**
     * peo_car_card_proportion -- 人证+车证完比例
     */
    private BigDecimal peoCarCardProportion;

    /**
     * monthly_application_num -- 月申请单数
     */
    private Integer monthlyApplicationNum;

    /**
     * total_application_num -- 总申请单数
     */
    private Integer totalApplicationNum;

    /**
     * in_library_or_not -- 是否在库 是;否
     */
    @Length(max = 2, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.inLibraryOrNot.Length")
    private String inLibraryOrNot;

    /**
     * warning_value -- 预警值
     */
    private Integer warningValue;

    /**
     * limit_value -- 限额值
     */
    private Integer limitValue;

    /**
     * create_by -- 创建人
     */
    @Length(max = 25, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.createBy.Length")
    private String createBy;

    /**
     * create_time -- 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * update_by -- 更新人
     */
    @Length(max = 25, message = "channel_affiliated_units_temp.ChannelAffiliatedUnitsTemp.updateBy.Length")
    private String updateBy;

    /**
     * update_time -- 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    /**
     * registered_time -- 注册时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date registeredTime;
    /**
     * apply_time -- 申请时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date applyTime;
    /**
     * long_term_or_not --运营年限是否长期
     */
    private String longTermOrNot;

    /**
     * 月单剩余数
     */
    private Integer monthlySurplusNum;
    /**
     * 总单剩余数
     */
    private Integer totalSurplusNum;
    /**
     * 是否进件端录入
     */
    private String isOrNotApply;
    @TableField(exist = false)
    private List queryStatus;
    @TableField(exist = false)
    private String start;
    @TableField(exist = false)
    private String review;
    @TableField(exist = false)
    private String defaultStatus;
    @TableField(exist = false)
    private String stop;
    @TableField(exist = false)
    private String back;
    @TableField(exist = false)
    private String refuse;

    /**
     * 网约车合作有效期
     * */
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date channelTermValidity;
    /**
     * 合作商关联关系状态
     */
    @TableField(exist = false)
    private String relationStatus;
    private static final long serialVersionUID = 1L;

}